package action;

import service.IUserService;

import com.opensymphony.xwork2.ActionSupport;

public class ValidateAction extends ActionSupport {
	
	private IUserService userService;
	private String username;
	
	@Override
	public String execute(){
		if(userService.exist(username)){
			return "failure";
		}
		return "success";
	}
	
	public IUserService getUserService() {
		return userService;
	}
	public void setUserService(IUserService userService) {
		this.userService = userService;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
}
